'use strict'
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
    console.log("enumerateDevices is not supported!");
} else {
    navigator.mediaDevices.enumerateDevices()
        .then(getDevices)
        .catch(handleError);
}
function getDevices(deviceInfos) {
    deviceInfos.forEach(function (deviceInfo) {
        console.log("kind=" + deviceInfo.kind + ":label=" + deviceInfo.label + ":id=" + deviceInfo.id + ":groupId=" + deviceInfo.groupId);
    });
}
function handleError(err) {
    console.log(err.name + ":" + err.message);
}